tool
extends EditorPlugin


const GeneTexture = preload("scene/GeneTexture.tscn")

var main_panel_instance 


func _enter_tree():
	main_panel_instance = GeneTexture.instance()
	main_panel_instance.editor_interface = get_editor_interface()
	get_editor_interface().get_editor_viewport().add_child(main_panel_instance)
	make_visible(false)

func make_visible(visible):
	if main_panel_instance:
		main_panel_instance.visible = visible

func has_main_screen():
	return true

func get_plugin_name():
	return "SpriteFramesTool"

func get_plugin_icon():
	return get_editor_interface().get_base_control().get_icon(
		"Control", "EditorIcons"
	)

func _exit_tree():
	if main_panel_instance:
		main_panel_instance.queue_free()


